package com.mall.controller;


import com.mall.pojo.ResponseMessage;
import com.mall.service.IRecommendGoodsService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ShouPeng
 * @since 2024-01-15
 * 推荐商品控制器
 */
@RestController
@RequestMapping("/recommend")
@CrossOrigin
public class RecommendGoodsController {
    final
    IRecommendGoodsService recommendGoodsService;

    public RecommendGoodsController(IRecommendGoodsService recommendGoodsService) {
        this.recommendGoodsService = recommendGoodsService;
    }

    @GetMapping
    public ResponseMessage queryRecommendGoods(){
        return ResponseMessage.success(recommendGoodsService.queryRecommendGoods());
    }

}

